#include<stdio.h>
#include<stdlib.h>
int main()
{
    int n=0;
    scanf("%d",&n);
    int* p=(int*)realloc(NULL,2*n*sizeof(int));
    int i=0;
    for (i=0;i<n;i++){
        scanf("%d",p+i);
        *(p+n+i)=*(p+i);
    }
    for (i=0;i<2*n;i++){
        printf("%d ",*(p+i));
    }
    return 0;
}
